package com.Romit.SpringStudy.Controller;

import com.Romit.Common.api.CommonResult;
import com.Romit.SpringStudy.Service.UmsMemberService;
import com.Romit.SpringStudy.entity.UmsMember;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@Api(tags = "UmsMemberLevelController", description = "会员等级管理")
@RequestMapping("/member")
public class UmsMemberController {
    @Autowired
    private UmsMemberService umsMemberService;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ApiOperation("查询所有会员等级")
    @ResponseBody
    public CommonResult<List<UmsMember>> list() {
        List<UmsMember> memberLevelList = umsMemberService.list();
        return CommonResult.success(memberLevelList);
    }


}


